package com.ljh.feign;

import com.ljh.pojo.Order;
import com.ljh.pojo.OrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "order")
public interface OrderFeign {
    @GetMapping("/order/deleteByUid/{uid}")
    public void deleteByUid(@PathVariable("uid") long uid);
    @PostMapping("/order/save")
    public void save(Order order);
    @GetMapping("/order/findAllByUid/{uid}/{index}/{limit}")
    public OrderVO findAllByUid(@PathVariable("uid") long uid, @PathVariable("index") int index,
                                @PathVariable("limit") int limit);

    @GetMapping("/order/deleteByMid/{mid}")
    public void deleteByMid(@PathVariable("mid") long mid);
    @GetMapping("/order/findAllByState/{state}/{page}/{limit}")
    public OrderVO findAllByState(@PathVariable("state") int state,@PathVariable("page") int page,
                                  @PathVariable("limit") int limit);
    @RequestMapping("/order/update/{id}/{aid}/{state}")
    public void updateState(@PathVariable("id") long id,@PathVariable("aid") long aid,
                            @PathVariable("state") int state);
}
